home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / appkit / Panel.h < prev    next >
Text File  |  1991-11-20  |  2KB  |  62 lines

  1. /*
  2.     Panel.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "Window.h"
  8.  
  9. /*
  10.  * In the following two functions, msg may be a printf-like message with
  11.  * the arguments tacked onto the end.  Thus, to get a '%' in your message,
  12.  * you must use '%%'
  13.  */
  14.  
  15. extern int NXRunAlertPanel(const char *title, const char *msg, const char *defaultButton, const char *alternateButton, const char *otherButton, ...);
  16.  
  17. extern int NXRunLocalizedAlertPanel(const char *table, const char *title, const char *msg, const char *defaultButton, const char *alternateButton, const char *otherButton, ...);
  18.  
  19. extern id NXGetAlertPanel(const char *title, const char *msg, const char *defaultButton, const char *alternateButton, const char *otherButton, ...);
  20.  
  21. extern void NXFreeAlertPanel(id panel);
  22.  
  23. /*
  24.  * NXRunAlertPanel() return values (also returned by runModalSession: when
  25.  * the modal session is run with a panel returned by NXGetAlertPanel()).
  26.  */
  27.  
  28. #define NX_ALERTDEFAULT        1
  29. #define NX_ALERTALTERNATE    0
  30. #define NX_ALERTOTHER        -1
  31. #define NX_ALERTERROR        -2
  32.  
  33. /* Tags for common controls in Panels */
  34.  
  35. #define NX_OKTAG    1
  36. #define NX_CANCELTAG    0
  37.  
  38. @interface Panel : Window
  39. {
  40. }
  41.  
  42. - initContent:(const NXRect *)contentRect style:(int)aStyle backing:(int)bufferingType buttonMask:(int)mask defer:(BOOL)flag;
  43. - init;
  44. - (BOOL)commandKey:(NXEvent *)theEvent;
  45. - keyDown:(NXEvent *)theEvent;
  46. - (BOOL)isFloatingPanel;
  47. - setFloatingPanel:(BOOL)flag;
  48. - (BOOL)doesBecomeKeyOnlyIfNeeded;
  49. - setBecomeKeyOnlyIfNeeded:(BOOL)flag;
  50. - (BOOL)worksWhenModal;
  51. - setWorksWhenModal:(BOOL)flag;
  52.  
  53. /* 
  54.  * The following new... methods are now obsolete.  They remain in this  
  55.  * interface file for backward compatibility only.  Use Object's alloc method  
  56.  * and the init... methods defined in this class instead.
  57.  */
  58. + newContent:(const NXRect *)contentRect style:(int)aStyle backing:(int)bufferingType buttonMask:(int)mask defer:(BOOL)flag;
  59. + new;
  60.  
  61. @end
  62.